package com.myplugin.rmp.popup.actions;

import java.io.IOException;
import java.util.ArrayList;

import javax.xml.parsers.ParserConfigurationException;

import gui.Interface;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
import org.xml.sax.SAXException;

import com.myplugin.rmp.views.ResourseManageView;

public class ResourceManagerAction1 implements IObjectActionDelegate{

	private String xpews;
	public static final String ID = "com.myplugin.rmp.views.ResourseManageView";
	
	@Override
	public void run(IAction action) {
		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		ResourseManageView view = (ResourseManageView) page.findView(ID);
		view.setArquivoXpews(xpews);
		view.getAction().run();
	}
	@Override
	public void selectionChanged(IAction action, ISelection selection) {
		xpews = selection.toString();
	}
	@Override
	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
	}
}
